package com.yn.xr.news.mode;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @description: 新闻评论记录表
 * @fileName:NewsComment.java
 * @createTime:2015年4月27日 下午5:20:24
 * @author:chenfeng
 * @version 1.0.0
 */
@Entity
@Table(name = "t_news_comment", catalog = "xrnetwork")
public class NewsComment implements Serializable {

	private static final long serialVersionUID = 2971325468230966523L;

	// Fields
	// 新闻评论唯一标识
	private Integer commentId;

	// 新闻唯一标识
	private Integer newsId;

	// 系统用户唯一标识
	private Integer userId;

	// 评论内容
	private String words;

	// 评论时间
	private Date commentTime;

	// 点赞次数
	private Integer approve;

	// 反对次数
	private Integer opposition;

	// 状态（1:有效，2：待审核，3：失效）
	private Short status;

	// 该评论是否可以被回复(0:否 1:是)
	private Short isAbleRevert;

	// 该评论是否被回复(0:否 1:是)
	private Short isReverted;

	// 该评论被回复的次数
	private Short revertTimes;

	// 新闻标题
	private String title;

	// 评论者
	private String userName;

	// 平台ID
	private Integer platformId;
	// 平台名称
	private String plateformName;

	// Constructors

	/** default constructor */
	public NewsComment() {
	}

	public NewsComment(Integer commentId, Integer newsId, Integer userId,
			String words, Date commentTime, Integer approve,
			Integer opposition, Short status, Short isAbleRevert,
			Short isReverted, Short revertTimes, String title, String userName,
			Integer platformId, String plateformName) {
		super();
		this.commentId = commentId;
		this.newsId = newsId;
		this.userId = userId;
		this.words = words;
		this.commentTime = commentTime;
		this.approve = approve;
		this.opposition = opposition;
		this.status = status;
		this.isAbleRevert = isAbleRevert;
		this.isReverted = isReverted;
		this.revertTimes = revertTimes;
		this.title = title;
		this.userName = userName;
		this.platformId = platformId;
		this.plateformName = plateformName;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "commentId", unique = true, nullable = false)
	public Integer getCommentId() {
		return commentId;
	}

	public void setCommentId(Integer commentId) {
		this.commentId = commentId;
	}

	@Column(name = "newsId")
	public Integer getNewsId() {
		return newsId;
	}

	public void setNewsId(Integer newsId) {
		this.newsId = newsId;
	}
	@Column(name = "userId")
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	@Column(name = "words")
	public String getWords() {
		return words;
	}

	public void setWords(String words) {
		this.words = words;
	}
	@Column(name = "commentTime")
	public Date getCommentTime() {
		return commentTime;
	}

	public void setCommentTime(Date commentTime) {
		this.commentTime = commentTime;
	}
	@Column(name = "approve")
	public Integer getApprove() {
		return approve;
	}

	public void setApprove(Integer approve) {
		this.approve = approve;
	}
	@Column(name = "opposition")
	public Integer getOpposition() {
		return opposition;
	}

	public void setOpposition(Integer opposition) {
		this.opposition = opposition;
	}
	@Column(name = "status")
	public Short getStatus() {
		return status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}
	@Column(name = "isAbleRevert")
	public Short getIsAbleRevert() {
		return isAbleRevert;
	}

	public void setIsAbleRevert(Short isAbleRevert) {
		this.isAbleRevert = isAbleRevert;
	}
	@Column(name = "isReverted")
	public Short getIsReverted() {
		return isReverted;
	}

	public void setIsReverted(Short isReverted) {
		this.isReverted = isReverted;
	}
	@Column(name = "revertTimes")
	public Short getRevertTimes() {
		return revertTimes;
	}

	public void setRevertTimes(Short revertTimes) {
		this.revertTimes = revertTimes;
	}
	
	@Column(name = "userName")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	@Column(name = "platformId")
	public Integer getPlatformId() {
		return platformId;
	}

	public void setPlatformId(Integer platformId) {
		this.platformId = platformId;
	}
	@Transient
	public String getPlateformName() {
		return plateformName;
	}

	public void setPlateformName(String plateformName) {
		this.plateformName = plateformName;
	}
	
	@Transient
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
}
